home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / programming / other / advlite20b115 / install < prev    next >
Text File  |  1999-11-29  |  5KB  |  209 lines

  1. ; $Id: AutodocViewerLite_Installer v2.0 (9 November 1999)
  2. ; $VER: AutodocViewerLite_Installer v2.0 Copyright © 1994-1999 Ronny Tennebekk (9 November 1999)
  3.  
  4. (set @default-dest "SYS:")
  5. (set #AutodocViewer "AutodocViewer Lite")
  6. (set #Version "2.0")
  7. (set #Date "12.11.1999")
  8. (set #MinSystemVersion 39)
  9. (set #AutodocViewerDirName "AutodocViewer")
  10. (set #DocumentationDirName "Docs")
  11. (set #ImagesDirName "Images")
  12.  
  13. ;------------------------------------------------------------
  14. ; English strings
  15. ;------------------------------------------------------------
  16.  
  17.     ; Message
  18.         (set #Message
  19.             (cat    "\nThank you very much for using\n\n"
  20.                 "--->>»» " #AutodocViewer " " #Version " ««<<---\n\n"
  21.                 "AutodocViewer is the most powerfull help tool for your\n"
  22.                 "Amiga developement environment\n"
  23.                 "by Ronny Tennebekk.\n\n\n\n"
  24.                 "Installscript ©1999 by Ronny Tennebekk\n\n"
  25.             )
  26.         )
  27.  
  28.         (set #EndMessage
  29.             (cat
  30.                 "\nThe installation is now complete.\n\n"
  31.                 "If you have any problems, please check for help:\n\n"
  32.                 "http://home.c2i.net/regulus/\n"
  33.                 "email:autodocviewer@c2i.net\n"
  34.             )
  35.         )
  36.  
  37.  
  38.     ; Errors
  39.         (set #Err-Bad-Kick
  40.             (cat    "You need at least KickStart 3.0 to run " #AutodocViewer "!"
  41.             )
  42.         )
  43.  
  44.         (set #Err-Bad-CPU
  45.             (cat    "You need at least a Motorola MC68020 CPU to run " #AutodocViewer "!"
  46.             )
  47.         )
  48.  
  49.     ; Ask Paths
  50.         (set #AskAdvPath
  51.             (cat    "Where do you want to install " #AutodocViewer "?\n"
  52.                 "A directory called AutodocViewer will be created!"
  53.             )
  54.         )
  55.  
  56.         (set #AskLibPath "Where do you want to install the libraries?")
  57. ;        (set #AskDocPath "Where do you want to install the documentation?\nA directory called Docs will be created!")
  58.  
  59.     ; Help
  60.         (set #AskLibPathHelp
  61.             (cat    "The directory where you have your libraries installed.\n"
  62.                 "Normally, this is the LIBS: directory.\n"
  63.             )
  64.         )
  65.  
  66. ;        (set #AskDocPathHelp "The directory where you want to install the documentation\n")
  67.  
  68.         (set #AskAdvPathHelp
  69.             (cat    "The directory where you want to install " #AutodocViewer "!\n"
  70.                 "This can be anywhere you want, a directory called "
  71.                 "AutodocViewer will be created.\n"
  72.             )
  73.         )
  74.  
  75.     ; Information
  76. ;        (set #_SettingsChanged
  77. ;            (cat    "\n\nYour old settings file 'autodocviewer.settings',\n"
  78. ;                "has been renamed to 'autodocviewer.settings.old'.\n"
  79. ;            )
  80. ;        )
  81.  
  82.  
  83. ;------------------------------------------------------------
  84. ; Procedures Get Paths
  85. ;------------------------------------------------------------
  86.  
  87. (procedure proc_AskAdvPath
  88.     (set #_advpath "SYS:")
  89.     (set #_advpath
  90.         (askdir    (prompt #AskAdvPath)
  91.             (help #AskAdvPathHelp)
  92.             (default #_advpath)
  93.         )
  94.     )
  95.     (set #_advpath (tackon #_advpath #AutodocViewerDirName))
  96.     (set #_imgpath (tackon #_advpath #ImagesDirName))
  97. )
  98.  
  99. (procedure proc_AskLibPath
  100.     (set #_libpath "LIBS:")
  101.     (set #_libpath
  102.         (askdir    (prompt #AskLibPath)
  103.             (help #AskLibPathHelp)
  104.             (default #_libpath)
  105.         )
  106.     )
  107. )
  108.  
  109. ;(procedure proc_AskDocPath
  110. ;    (set #_docpath #_advpath)
  111. ;    (set #_docpath
  112. ;        (askdir    (prompt #AskDocPath)
  113. ;            (help #AskDocPathHelp)
  114. ;            (default #_docpath)
  115. ;        )
  116. ;    )
  117. ;    (set #_docpath (tackon #_docpath #DocumentationDirName))
  118. ;)
  119.  
  120. ;------------------------------------------------------------
  121. ; Main procdure
  122. ;------------------------------------------------------------
  123.  
  124. (message #Message (all))
  125.  
  126. (if
  127.     (< (getversion) (* #MinSysVersion 65536))
  128.     (abort #Err-Bad-Kick)
  129. )
  130.  
  131. (if
  132.     (patmatch "(68000|68010)" (database "cpu"))
  133.     (abort #Err-Bad-Cpu)
  134. )
  135.  
  136. (complete 10)
  137.  
  138. (proc_AskAdvPath)
  139.  
  140. (complete 15)
  141.  
  142. (if (= (exists #_advpath (noreq)) 0)
  143.     (makedir #_advpath)
  144. )
  145.  
  146. (complete 20)
  147.  
  148. (if (= (exists #_imgpath (noreq)) 0)
  149.     (makedir #_imgpath)
  150. )
  151.  
  152. (complete 25)
  153.  
  154. (proc_AskLibPath)
  155.  
  156. ;(proc_AskDocPath)
  157.  
  158. ;(if (= (exists #_docpath (noreq)) 0)
  159. ;    (makedir #_docpath)
  160. ;)
  161.  
  162. (complete 30)
  163.  
  164. (copyfiles
  165.     (source "AutodocViewer")
  166.     (dest #_advpath)
  167.     (infos)
  168. )
  169.  
  170. (complete 40)
  171.  
  172. (copyfiles
  173.     (prompt "Copying images...")
  174.     (source "images")
  175.     (dest #_imgpath)
  176.     (all)
  177. )
  178.  
  179. (complete 85)
  180.  
  181. ;(copyfiles
  182. ;    (prompt "Copying documentation...")
  183. ;    (source "Documentation")
  184. ;    (dest #_docpath)
  185. ;    (all)
  186. ;)
  187.  
  188. (complete 90)
  189.  
  190. (copylib
  191.     (prompt "Copying autodoc.library...")
  192.     (help @copylib-help)
  193.     (source "libs/autodoc.library")
  194.     (dest #_libpath)
  195.     (confirm)
  196. )
  197.  
  198. (if (= (exists (tackon #_advpath "autodocviewer.settings")))
  199.     (rename (tackon #_advpath "autodocviewer.settings") (tackon #_advpath "autodocviewer.settings.old"))
  200. ;    (message #_SettingsChanged (all))
  201. )
  202.  
  203. ;------------------------------------------------------------
  204. ; Installization complete
  205. ;------------------------------------------------------------
  206.  
  207. (complete 100)
  208. (exit #EndMessage)
  209.